package LinkedList_03.Double_Linked_List_04;/*
 * @Author 罗
 * @date 2020/3/12 - 6:11 下午
 *
 */

import org.junit.Test;

public class test {
    @Test
    public void test(){
        DoubleLinkedList<HeroNode> doubleLinkedList = new DoubleLinkedList<>();

        doubleLinkedList.addByOrder(new HeroNode(4,"乌拉"));
        doubleLinkedList.addByOrder(new HeroNode(3,"收到"));

        doubleLinkedList.addByOrder(new HeroNode(2,"你好"));
        doubleLinkedList.addByOrder(new HeroNode(1,"睡觉"));
        doubleLinkedList.addByOrder(new HeroNode(9,"打游戏"));
        doubleLinkedList.addByOrder(new HeroNode(8,"敲代码"));
        doubleLinkedList.deleteById(4);
        doubleLinkedList.show();
        System.out.println("修改");
        doubleLinkedList.update(new HeroNode(1,"干大事"));
        doubleLinkedList.show();
        System.out.println("反转");
        doubleLinkedList.reverse();

        doubleLinkedList.show();
    }
}
